package com.bainuo.doctor.common.widget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import com.bainuo.doctor.common.widget.banner.Banner;


/**
 * Description:定制首页bannerview
 */

public class CustomBannerView extends Banner implements HorizontalMoveView {
    /**
     * 手势
     */
    private int mEventAction = MotionEvent.ACTION_UP;

    public CustomBannerView(Context context) {
        super(context);
    }

    public CustomBannerView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public CustomBannerView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        mEventAction = ev.getAction();
        return super.dispatchTouchEvent(ev);
    }

    /**
     * 获取动作
     *
     * @return
     */
    public int getEventAction() {
        return mEventAction;
    }


    @Override
    public int getCurrentTouchEvent() {
        return mEventAction;
    }
}
